package com.six.work.servicesImpl;

import com.six.work.entity.Ad;
import com.six.work.entity.AdView;
import com.six.work.entity.Admin;
import com.six.work.entity.Applicant;
import com.six.work.mapper.AdminMapper;
import com.six.work.services.AdminServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceslmpl implements AdminServices {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public List<Admin> findAllAdmin() {
        List<Admin> list = adminMapper.findAllAdmin();
        return list;
    }

    @Override    //增加
    public Integer insertAdmin(Admin admin) {
        return adminMapper.insertAdmin(admin);
    }

    @Override   //更新
    public Integer updateAdmin(Admin admin) {
        return adminMapper.updateAdmin(admin);
    }

    @Override   //删除
    public Integer DelAdminByID(Integer admin_id) {
        return adminMapper.DelAdminByID(admin_id);
    }

    @Override
    public Admin SelectAdminByID(Integer admin_id) {
        return adminMapper.SelectAdminByID(admin_id);
    }

    @Override
    public List<Admin> findAdminByName(String admin) {
        return adminMapper.findAdminByName(admin);
    }


    @Override  //登陆
    public Admin UserLogin(String admin_name) {
        return adminMapper.UserLogin(admin_name);
    }



}
